<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/google/protobuf/wire_format_lite_inl.h</title>
  <link rel="stylesheet" type="text/css" href="../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../index.html">top level</a> - <a href="index.html">usr/include/google/protobuf</a> - wire_format_lite_inl.h<span style="font-size: 80%;"> (source / <a href="wire_format_lite_inl.h.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">46</td>
            <td class="headerCovTableEntry">89</td>
            <td class="headerCovTableEntryLo">51.7 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:25:26</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">11</td>
            <td class="headerCovTableEntry">125</td>
            <td class="headerCovTableEntryLo">8.8 %</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : // Protocol Buffers - Google's data interchange format</a>
<span class="lineNum">       2 </span>            : // Copyright 2008 Google Inc.  All rights reserved.
<span class="lineNum">       3 </span>            : // https://developers.google.com/protocol-buffers/
<span class="lineNum">       4 </span>            : //
<span class="lineNum">       5 </span>            : // Redistribution and use in source and binary forms, with or without
<span class="lineNum">       6 </span>            : // modification, are permitted provided that the following conditions are
<span class="lineNum">       7 </span>            : // met:
<span class="lineNum">       8 </span>            : //
<span class="lineNum">       9 </span>            : //     * Redistributions of source code must retain the above copyright
<span class="lineNum">      10 </span>            : // notice, this list of conditions and the following disclaimer.
<span class="lineNum">      11 </span>            : //     * Redistributions in binary form must reproduce the above
<span class="lineNum">      12 </span>            : // copyright notice, this list of conditions and the following disclaimer
<span class="lineNum">      13 </span>            : // in the documentation and/or other materials provided with the
<span class="lineNum">      14 </span>            : // distribution.
<span class="lineNum">      15 </span>            : //     * Neither the name of Google Inc. nor the names of its
<span class="lineNum">      16 </span>            : // contributors may be used to endorse or promote products derived from
<span class="lineNum">      17 </span>            : // this software without specific prior written permission.
<span class="lineNum">      18 </span>            : //
<span class="lineNum">      19 </span>            : // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
<span class="lineNum">      20 </span>            : // &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
<span class="lineNum">      21 </span>            : // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
<span class="lineNum">      22 </span>            : // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
<span class="lineNum">      23 </span>            : // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
<span class="lineNum">      24 </span>            : // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
<span class="lineNum">      25 </span>            : // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
<span class="lineNum">      26 </span>            : // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
<span class="lineNum">      27 </span>            : // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
<span class="lineNum">      28 </span>            : // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
<span class="lineNum">      29 </span>            : // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<span class="lineNum">      30 </span>            : 
<span class="lineNum">      31 </span>            : // Author: kenton@google.com (Kenton Varda)
<span class="lineNum">      32 </span>            : //         wink@google.com (Wink Saville) (refactored from wire_format.h)
<span class="lineNum">      33 </span>            : //  Based on original Protocol Buffers design by
<span class="lineNum">      34 </span>            : //  Sanjay Ghemawat, Jeff Dean, and others.
<span class="lineNum">      35 </span>            : 
<span class="lineNum">      36 </span>            : #ifndef GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
<span class="lineNum">      37 </span>            : #define GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
<span class="lineNum">      38 </span>            : 
<span class="lineNum">      39 </span>            : #ifdef _MSC_VER
<span class="lineNum">      40 </span>            : // This is required for min/max on VS2013 only.
<span class="lineNum">      41 </span>            : #include &lt;algorithm&gt;
<span class="lineNum">      42 </span>            : #endif
<span class="lineNum">      43 </span>            : 
<span class="lineNum">      44 </span>            : #include &lt;string&gt;
<span class="lineNum">      45 </span>            : #include &lt;google/protobuf/stubs/common.h&gt;
<span class="lineNum">      46 </span>            : #include &lt;google/protobuf/message_lite.h&gt;
<span class="lineNum">      47 </span>            : #include &lt;google/protobuf/repeated_field.h&gt;
<span class="lineNum">      48 </span>            : #include &lt;google/protobuf/wire_format_lite.h&gt;
<span class="lineNum">      49 </span>            : #include &lt;google/protobuf/io/coded_stream.h&gt;
<span class="lineNum">      50 </span>            : 
<span class="lineNum">      51 </span>            : 
<span class="lineNum">      52 </span>            : namespace google {
<span class="lineNum">      53 </span>            : namespace protobuf {
<span class="lineNum">      54 </span>            : namespace internal {
<span class="lineNum">      55 </span>            : 
<span class="lineNum">      56 </span>            : // Implementation details of ReadPrimitive.
<span class="lineNum">      57 </span>            : 
<span class="lineNum">      58 </span>            : template &lt;&gt;
<span class="lineNum">      59 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;int32, WireFormatLite::TYPE_INT32&gt;(
<span class="lineNum">      60 </span>            :     io::CodedInputStream* input,
<span class="lineNum">      61 </span>            :     int32* value) {
<span class="lineNum">      62 </span>            :   uint32 temp;
<span class="lineNum">      63 </span><span class="lineCov">      41204 :   if (!input-&gt;ReadVarint32(&amp;temp)) return false;</span>
<span class="lineNum">      64 </span><span class="lineCov">      41204 :   *value = static_cast&lt;int32&gt;(temp);</span>
<span class="lineNum">      65 </span>            :   return true;
<span class="lineNum">      66 </span>            : }
<span class="lineNum">      67 </span>            : template &lt;&gt;
<span class="lineNum">      68 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;int64, WireFormatLite::TYPE_INT64&gt;(
<span class="lineNum">      69 </span>            :     io::CodedInputStream* input,
<span class="lineNum">      70 </span>            :     int64* value) {
<span class="lineNum">      71 </span>            :   uint64 temp;
<span class="lineNum">      72 </span><span class="lineCov">         16 :   if (!input-&gt;ReadVarint64(&amp;temp)) return false;</span>
<span class="lineNum">      73 </span><span class="lineCov">         16 :   *value = static_cast&lt;int64&gt;(temp);</span>
<span class="lineNum">      74 </span>            :   return true;
<span class="lineNum">      75 </span>            : }
<span class="lineNum">      76 </span>            : template &lt;&gt;
<span class="lineNum">      77 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;uint32, WireFormatLite::TYPE_UINT32&gt;(
<span class="lineNum">      78 </span>            :     io::CodedInputStream* input,
<span class="lineNum">      79 </span>            :     uint32* value) {
<span class="lineNum">      80 </span><span class="lineCov">         13 :   return input-&gt;ReadVarint32(value);</span>
<span class="lineNum">      81 </span>            : }
<span class="lineNum">      82 </span>            : template &lt;&gt;
<span class="lineNum">      83 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;uint64, WireFormatLite::TYPE_UINT64&gt;(
<span class="lineNum">      84 </span>            :     io::CodedInputStream* input,
<span class="lineNum">      85 </span>            :     uint64* value) {
<span class="lineNum">      86 </span>            :   return input-&gt;ReadVarint64(value);
<span class="lineNum">      87 </span>            : }
<span class="lineNum">      88 </span>            : template &lt;&gt;
<span class="lineNum">      89 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;int32, WireFormatLite::TYPE_SINT32&gt;(
<span class="lineNum">      90 </span>            :     io::CodedInputStream* input,
<span class="lineNum">      91 </span>            :     int32* value) {
<span class="lineNum">      92 </span>            :   uint32 temp;
<span class="lineNum">      93 </span>            :   if (!input-&gt;ReadVarint32(&amp;temp)) return false;
<span class="lineNum">      94 </span>            :   *value = ZigZagDecode32(temp);
<span class="lineNum">      95 </span>            :   return true;
<span class="lineNum">      96 </span>            : }
<span class="lineNum">      97 </span>            : template &lt;&gt;
<span class="lineNum">      98 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;int64, WireFormatLite::TYPE_SINT64&gt;(
<span class="lineNum">      99 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     100 </span>            :     int64* value) {
<span class="lineNum">     101 </span>            :   uint64 temp;
<span class="lineNum">     102 </span>            :   if (!input-&gt;ReadVarint64(&amp;temp)) return false;
<span class="lineNum">     103 </span>            :   *value = ZigZagDecode64(temp);
<span class="lineNum">     104 </span>            :   return true;
<span class="lineNum">     105 </span>            : }
<span class="lineNum">     106 </span>            : template &lt;&gt;
<span class="lineNum">     107 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;uint32, WireFormatLite::TYPE_FIXED32&gt;(
<span class="lineNum">     108 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     109 </span>            :     uint32* value) {
<span class="lineNum">     110 </span>            :   return input-&gt;ReadLittleEndian32(value);
<span class="lineNum">     111 </span>            : }
<span class="lineNum">     112 </span>            : template &lt;&gt;
<span class="lineNum">     113 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;uint64, WireFormatLite::TYPE_FIXED64&gt;(
<span class="lineNum">     114 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     115 </span>            :     uint64* value) {
<span class="lineNum">     116 </span>            :   return input-&gt;ReadLittleEndian64(value);
<span class="lineNum">     117 </span>            : }
<span class="lineNum">     118 </span>            : template &lt;&gt;
<span class="lineNum">     119 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;int32, WireFormatLite::TYPE_SFIXED32&gt;(
<span class="lineNum">     120 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     121 </span>            :     int32* value) {
<span class="lineNum">     122 </span>            :   uint32 temp;
<span class="lineNum">     123 </span>            :   if (!input-&gt;ReadLittleEndian32(&amp;temp)) return false;
<span class="lineNum">     124 </span>            :   *value = static_cast&lt;int32&gt;(temp);
<span class="lineNum">     125 </span>            :   return true;
<span class="lineNum">     126 </span>            : }
<span class="lineNum">     127 </span>            : template &lt;&gt;
<span class="lineNum">     128 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;int64, WireFormatLite::TYPE_SFIXED64&gt;(
<span class="lineNum">     129 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     130 </span>            :     int64* value) {
<span class="lineNum">     131 </span>            :   uint64 temp;
<span class="lineNum">     132 </span>            :   if (!input-&gt;ReadLittleEndian64(&amp;temp)) return false;
<span class="lineNum">     133 </span>            :   *value = static_cast&lt;int64&gt;(temp);
<span class="lineNum">     134 </span>            :   return true;
<span class="lineNum">     135 </span>            : }
<span class="lineNum">     136 </span>            : template &lt;&gt;
<span class="lineNum">     137 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;float, WireFormatLite::TYPE_FLOAT&gt;(
<span class="lineNum">     138 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     139 </span>            :     float* value) {
<span class="lineNum">     140 </span>            :   uint32 temp;
<span class="lineNum">     141 </span><span class="lineCov">         10 :   if (!input-&gt;ReadLittleEndian32(&amp;temp)) return false;</span>
<span class="lineNum">     142 </span><span class="lineCov">         20 :   *value = DecodeFloat(temp);</span>
<span class="lineNum">     143 </span>            :   return true;
<span class="lineNum">     144 </span>            : }
<span class="lineNum">     145 </span>            : template &lt;&gt;
<span class="lineNum">     146 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;double, WireFormatLite::TYPE_DOUBLE&gt;(
<span class="lineNum">     147 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     148 </span>            :     double* value) {
<span class="lineNum">     149 </span>            :   uint64 temp;
<span class="lineNum">     150 </span><span class="lineNoCov">          0 :   if (!input-&gt;ReadLittleEndian64(&amp;temp)) return false;</span>
<span class="lineNum">     151 </span><span class="lineNoCov">          0 :   *value = DecodeDouble(temp);</span>
<span class="lineNum">     152 </span>            :   return true;
<span class="lineNum">     153 </span>            : }
<span class="lineNum">     154 </span>            : template &lt;&gt;
<span class="lineNum">     155 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;bool, WireFormatLite::TYPE_BOOL&gt;(
<span class="lineNum">     156 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     157 </span>            :     bool* value) {
<span class="lineNum">     158 </span>            :   uint64 temp;
<span class="lineNum">     159 </span><span class="lineNoCov">          0 :   if (!input-&gt;ReadVarint64(&amp;temp)) return false;</span>
<span class="lineNum">     160 </span><span class="lineNoCov">          0 :   *value = temp != 0;</span>
<span class="lineNum">     161 </span>            :   return true;
<span class="lineNum">     162 </span>            : }
<span class="lineNum">     163 </span>            : template &lt;&gt;
<span class="lineNum">     164 </span>            : inline bool WireFormatLite::ReadPrimitive&lt;int, WireFormatLite::TYPE_ENUM&gt;(
<span class="lineNum">     165 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     166 </span>            :     int* value) {
<span class="lineNum">     167 </span>            :   uint32 temp;
<span class="lineNum">     168 </span><span class="lineCov">         13 :   if (!input-&gt;ReadVarint32(&amp;temp)) return false;</span>
<span class="lineNum">     169 </span><span class="lineCov">         13 :   *value = static_cast&lt;int&gt;(temp);</span>
<span class="lineNum">     170 </span>            :   return true;
<span class="lineNum">     171 </span>            : }
<span class="lineNum">     172 </span>            : 
<span class="lineNum">     173 </span>            : template &lt;&gt;
<span class="lineNum">     174 </span>            : inline const uint8* WireFormatLite::ReadPrimitiveFromArray&lt;
<span class="lineNum">     175 </span>            :   uint32, WireFormatLite::TYPE_FIXED32&gt;(
<span class="lineNum">     176 </span>            :     const uint8* buffer,
<span class="lineNum">     177 </span>            :     uint32* value) {
<span class="lineNum">     178 </span>            :   return io::CodedInputStream::ReadLittleEndian32FromArray(buffer, value);
<span class="lineNum">     179 </span>            : }
<span class="lineNum">     180 </span>            : template &lt;&gt;
<span class="lineNum">     181 </span>            : inline const uint8* WireFormatLite::ReadPrimitiveFromArray&lt;
<span class="lineNum">     182 </span>            :   uint64, WireFormatLite::TYPE_FIXED64&gt;(
<span class="lineNum">     183 </span>            :     const uint8* buffer,
<span class="lineNum">     184 </span>            :     uint64* value) {
<span class="lineNum">     185 </span>            :   return io::CodedInputStream::ReadLittleEndian64FromArray(buffer, value);
<span class="lineNum">     186 </span>            : }
<span class="lineNum">     187 </span>            : template &lt;&gt;
<span class="lineNum">     188 </span>            : inline const uint8* WireFormatLite::ReadPrimitiveFromArray&lt;
<span class="lineNum">     189 </span>            :   int32, WireFormatLite::TYPE_SFIXED32&gt;(
<span class="lineNum">     190 </span>            :     const uint8* buffer,
<span class="lineNum">     191 </span>            :     int32* value) {
<span class="lineNum">     192 </span>            :   uint32 temp;
<span class="lineNum">     193 </span>            :   buffer = io::CodedInputStream::ReadLittleEndian32FromArray(buffer, &amp;temp);
<span class="lineNum">     194 </span>            :   *value = static_cast&lt;int32&gt;(temp);
<span class="lineNum">     195 </span>            :   return buffer;
<span class="lineNum">     196 </span>            : }
<span class="lineNum">     197 </span>            : template &lt;&gt;
<span class="lineNum">     198 </span>            : inline const uint8* WireFormatLite::ReadPrimitiveFromArray&lt;
<span class="lineNum">     199 </span>            :   int64, WireFormatLite::TYPE_SFIXED64&gt;(
<span class="lineNum">     200 </span>            :     const uint8* buffer,
<span class="lineNum">     201 </span>            :     int64* value) {
<span class="lineNum">     202 </span>            :   uint64 temp;
<span class="lineNum">     203 </span>            :   buffer = io::CodedInputStream::ReadLittleEndian64FromArray(buffer, &amp;temp);
<span class="lineNum">     204 </span>            :   *value = static_cast&lt;int64&gt;(temp);
<span class="lineNum">     205 </span>            :   return buffer;
<span class="lineNum">     206 </span>            : }
<span class="lineNum">     207 </span>            : template &lt;&gt;
<span class="lineNum">     208 </span>            : inline const uint8* WireFormatLite::ReadPrimitiveFromArray&lt;
<span class="lineNum">     209 </span>            :   float, WireFormatLite::TYPE_FLOAT&gt;(
<span class="lineNum">     210 </span>            :     const uint8* buffer,
<span class="lineNum">     211 </span>            :     float* value) {
<span class="lineNum">     212 </span>            :   uint32 temp;
<span class="lineNum">     213 </span>            :   buffer = io::CodedInputStream::ReadLittleEndian32FromArray(buffer, &amp;temp);
<span class="lineNum">     214 </span><span class="lineNoCov">          0 :   *value = DecodeFloat(temp);</span>
<span class="lineNum">     215 </span>            :   return buffer;
<span class="lineNum">     216 </span>            : }
<span class="lineNum">     217 </span>            : template &lt;&gt;
<span class="lineNum">     218 </span>            : inline const uint8* WireFormatLite::ReadPrimitiveFromArray&lt;
<span class="lineNum">     219 </span>            :   double, WireFormatLite::TYPE_DOUBLE&gt;(
<span class="lineNum">     220 </span>            :     const uint8* buffer,
<span class="lineNum">     221 </span>            :     double* value) {
<span class="lineNum">     222 </span>            :   uint64 temp;
<span class="lineNum">     223 </span>            :   buffer = io::CodedInputStream::ReadLittleEndian64FromArray(buffer, &amp;temp);
<span class="lineNum">     224 </span><span class="lineNoCov">          0 :   *value = DecodeDouble(temp);</span>
<span class="lineNum">     225 </span>            :   return buffer;
<span class="lineNum">     226 </span>            : }
<span class="lineNum">     227 </span>            : 
<span class="lineNum">     228 </span>            : template &lt;typename CType, enum WireFormatLite::FieldType DeclaredType&gt;
<span class="lineNum">     229 </span>            : inline bool WireFormatLite::ReadRepeatedPrimitive(
<span class="lineNum">     230 </span>            :     int,  // tag_size, unused.
<span class="lineNum">     231 </span>            :     uint32 tag,
<span class="lineNum">     232 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     233 </span>            :     RepeatedField&lt;CType&gt;* values) {
<span class="lineNum">     234 </span>            :   CType value;
<span class="lineNum">     235 </span><span class="lineCov">          4 :   if (!ReadPrimitive&lt;CType, DeclaredType&gt;(input, &amp;value)) return false;</span>
<span class="lineNum">     236 </span><span class="lineCov">          4 :   values-&gt;Add(value);</span>
<span class="lineNum">     237 </span><span class="lineCov">          4 :   int elements_already_reserved = values-&gt;Capacity() - values-&gt;size();</span>
<span class="lineNum">     238 </span><span class="lineCov">          8 :   while (elements_already_reserved &gt; 0 &amp;&amp; input-&gt;ExpectTag(tag)) {</span>
<span class="lineNum">     239 </span><span class="lineNoCov">          0 :     if (!ReadPrimitive&lt;CType, DeclaredType&gt;(input, &amp;value)) return false;</span>
<span class="lineNum">     240 </span>            :     values-&gt;AddAlreadyReserved(value);
<span class="lineNum">     241 </span><span class="lineNoCov">          0 :     elements_already_reserved--;</span>
<span class="lineNum">     242 </span>            :   }
<span class="lineNum">     243 </span>            :   return true;
<span class="lineNum">     244 </span>            : }
<span class="lineNum">     245 </span>            : 
<span class="lineNum">     246 </span>            : template &lt;typename CType, enum WireFormatLite::FieldType DeclaredType&gt;
<span class="lineNum">     247 </span>            : inline bool WireFormatLite::ReadRepeatedFixedSizePrimitive(
<span class="lineNum">     248 </span>            :     int tag_size,
<span class="lineNum">     249 </span>            :     uint32 tag,
<span class="lineNum">     250 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     251 </span>            :     RepeatedField&lt;CType&gt;* values) {
<span class="lineNum">     252 </span>            :   GOOGLE_DCHECK_EQ(UInt32Size(tag), tag_size);
<span class="lineNum">     253 </span>            :   CType value;
<span class="lineNum">     254 </span><span class="lineCov">          1 :   if (!ReadPrimitive&lt;CType, DeclaredType&gt;(input, &amp;value))</span>
<span class="lineNum">     255 </span>            :     return false;
<span class="lineNum">     256 </span><span class="lineCov">          1 :   values-&gt;Add(value);</span>
<span class="lineNum">     257 </span>            : 
<span class="lineNum">     258 </span>            :   // For fixed size values, repeated values can be read more quickly by
<span class="lineNum">     259 </span>            :   // reading directly from a raw array.
<span class="lineNum">     260 </span>            :   //
<span class="lineNum">     261 </span>            :   // We can get a tight loop by only reading as many elements as can be
<span class="lineNum">     262 </span>            :   // added to the RepeatedField without having to do any resizing. Additionally,
<span class="lineNum">     263 </span>            :   // we only try to read as many elements as are available from the current
<span class="lineNum">     264 </span>            :   // buffer space. Doing so avoids having to perform boundary checks when
<span class="lineNum">     265 </span>            :   // reading the value: the maximum number of elements that can be read is
<span class="lineNum">     266 </span>            :   // known outside of the loop.
<span class="lineNum">     267 </span>            :   const void* void_pointer;
<span class="lineNum">     268 </span>            :   int size;
<span class="lineNum">     269 </span>            :   input-&gt;GetDirectBufferPointerInline(&amp;void_pointer, &amp;size);
<span class="lineNum">     270 </span><span class="lineCov">          1 :   if (size &gt; 0) {</span>
<span class="lineNum">     271 </span>            :     const uint8* buffer = reinterpret_cast&lt;const uint8*&gt;(void_pointer);
<span class="lineNum">     272 </span>            :     // The number of bytes each type occupies on the wire.
<span class="lineNum">     273 </span><span class="lineNoCov">          0 :     const int per_value_size = tag_size + sizeof(value);</span>
<span class="lineNum">     274 </span>            : 
<span class="lineNum">     275 </span><span class="lineCov">          2 :     int elements_available = min(values-&gt;Capacity() - values-&gt;size(),</span>
<span class="lineNum">     276 </span><span class="lineCov">          1 :                                  size / per_value_size);</span>
<span class="lineNum">     277 </span>            :     int num_read = 0;
<span class="lineNum">     278 </span><span class="lineCov">          1 :     while (num_read &lt; elements_available &amp;&amp;</span>
<span class="lineNum">     279 </span>            :            (buffer = io::CodedInputStream::ExpectTagFromArray(
<span class="lineNum">     280 </span>            :                buffer, tag)) != NULL) {
<span class="lineNum">     281 </span>            :       buffer = ReadPrimitiveFromArray&lt;CType, DeclaredType&gt;(buffer, &amp;value);
<span class="lineNum">     282 </span><span class="lineNoCov">          0 :       values-&gt;AddAlreadyReserved(value);</span>
<span class="lineNum">     283 </span><span class="lineNoCov">          0 :       ++num_read;</span>
<span class="lineNum">     284 </span>            :     }
<span class="lineNum">     285 </span><span class="lineCov">          1 :     const int read_bytes = num_read * per_value_size;</span>
<span class="lineNum">     286 </span><span class="lineCov">          1 :     if (read_bytes &gt; 0) {</span>
<span class="lineNum">     287 </span><span class="lineNoCov">          0 :       input-&gt;Skip(read_bytes);</span>
<span class="lineNum">     288 </span>            :     }
<span class="lineNum">     289 </span>            :   }
<span class="lineNum">     290 </span>            :   return true;
<span class="lineNum">     291 </span>            : }
<span class="lineNum">     292 </span>            : 
<span class="lineNum">     293 </span>            : // Specializations of ReadRepeatedPrimitive for the fixed size types, which use
<span class="lineNum">     294 </span>            : // the optimized code path.
<span class="lineNum">     295 </span>            : #define READ_REPEATED_FIXED_SIZE_PRIMITIVE(CPPTYPE, DECLARED_TYPE)             \
<span class="lineNum">     296 </span>            : template &lt;&gt;                                                                    \
<span class="lineNum">     297 </span>            : inline bool WireFormatLite::ReadRepeatedPrimitive&lt;                             \
<span class="lineNum">     298 </span>            :   CPPTYPE, WireFormatLite::DECLARED_TYPE&gt;(                                     \
<span class="lineNum">     299 </span>            :     int tag_size,                                                              \
<span class="lineNum">     300 </span>            :     uint32 tag,                                                                \
<span class="lineNum">     301 </span>            :     io::CodedInputStream* input,                                               \
<span class="lineNum">     302 </span>            :     RepeatedField&lt;CPPTYPE&gt;* values) {                                          \
<span class="lineNum">     303 </span>            :   return ReadRepeatedFixedSizePrimitive&lt;                                       \
<span class="lineNum">     304 </span>            :     CPPTYPE, WireFormatLite::DECLARED_TYPE&gt;(                                   \
<span class="lineNum">     305 </span>            :       tag_size, tag, input, values);                                           \
<span class="lineNum">     306 </span>            : }
<span class="lineNum">     307 </span>            : 
<span class="lineNum">     308 </span>            : READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32)
<span class="lineNum">     309 </span>            : READ_REPEATED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64)
<span class="lineNum">     310 </span>            : READ_REPEATED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32)
<span class="lineNum">     311 </span>            : READ_REPEATED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64)
<span class="lineNum">     312 </span>            : READ_REPEATED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT)
<span class="lineNum">     313 </span>            : READ_REPEATED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE)
<span class="lineNum">     314 </span>            : 
<span class="lineNum">     315 </span>            : #undef READ_REPEATED_FIXED_SIZE_PRIMITIVE
<a name="316"><span class="lineNum">     316 </span>            : </a>
<span class="lineNum">     317 </span>            : template &lt;typename CType, enum WireFormatLite::FieldType DeclaredType&gt;
<span class="lineNum">     318 </span><span class="lineNoCov">          0 : bool WireFormatLite::ReadRepeatedPrimitiveNoInline(</span>
<span class="lineNum">     319 </span>            :     int tag_size,
<span class="lineNum">     320 </span>            :     uint32 tag,
<span class="lineNum">     321 </span>            :     io::CodedInputStream* input,
<span class="lineNum">     322 </span>            :     RepeatedField&lt;CType&gt;* value) {
<span class="lineNum">     323 </span>            :   return ReadRepeatedPrimitive&lt;CType, DeclaredType&gt;(
<span class="lineNum">     324 </span><span class="lineNoCov">          0 :       tag_size, tag, input, value);</span>
<span class="lineNum">     325 </span>            : }
<span class="lineNum">     326 </span>            : 
<span class="lineNum">     327 </span>            : template &lt;typename CType, enum WireFormatLite::FieldType DeclaredType&gt;
<span class="lineNum">     328 </span>            : inline bool WireFormatLite::ReadPackedPrimitive(io::CodedInputStream* input,
<span class="lineNum">     329 </span>            :                                                 RepeatedField&lt;CType&gt;* values) {
<span class="lineNum">     330 </span>            :   uint32 length;
<span class="lineNum">     331 </span><span class="lineCov">          8 :   if (!input-&gt;ReadVarint32(&amp;length)) return false;</span>
<span class="lineNum">     332 </span><span class="lineCov">          8 :   io::CodedInputStream::Limit limit = input-&gt;PushLimit(length);</span>
<span class="lineNum">     333 </span><span class="lineCov">         24 :   while (input-&gt;BytesUntilLimit() &gt; 0) {</span>
<span class="lineNum">     334 </span>            :     CType value;
<span class="lineNum">     335 </span><span class="lineCov">         16 :     if (!ReadPrimitive&lt;CType, DeclaredType&gt;(input, &amp;value)) return false;</span>
<span class="lineNum">     336 </span><span class="lineCov">         16 :     values-&gt;Add(value);</span>
<span class="lineNum">     337 </span>            :   }
<span class="lineNum">     338 </span><span class="lineCov">          8 :   input-&gt;PopLimit(limit);</span>
<span class="lineNum">     339 </span>            :   return true;
<span class="lineNum">     340 </span>            : }
<span class="lineNum">     341 </span>            : 
<span class="lineNum">     342 </span>            : template &lt;typename CType, enum WireFormatLite::FieldType DeclaredType&gt;
<span class="lineNum">     343 </span>            : inline bool WireFormatLite::ReadPackedFixedSizePrimitive(
<span class="lineNum">     344 </span>            :     io::CodedInputStream* input, RepeatedField&lt;CType&gt;* values) {
<span class="lineNum">     345 </span>            :   uint32 length;
<span class="lineNum">     346 </span><span class="lineCov">          8 :   if (!input-&gt;ReadVarint32(&amp;length)) return false;</span>
<span class="lineNum">     347 </span><span class="lineCov">          8 :   const uint32 old_entries = values-&gt;size();</span>
<span class="lineNum">     348 </span><span class="lineCov">          8 :   const uint32 new_entries = length / sizeof(CType);</span>
<span class="lineNum">     349 </span><span class="lineCov">          8 :   const uint32 new_bytes = new_entries * sizeof(CType);</span>
<span class="lineNum">     350 </span><span class="lineCov">          8 :   if (new_bytes != length) return false;</span>
<span class="lineNum">     351 </span>            :   // We would *like* to pre-allocate the buffer to write into (for
<span class="lineNum">     352 </span>            :   // speed), but *must* avoid performing a very large allocation due
<span class="lineNum">     353 </span>            :   // to a malicious user-supplied &quot;length&quot; above.  So we have a fast
<span class="lineNum">     354 </span>            :   // path that pre-allocates when the &quot;length&quot; is less than a bound.
<span class="lineNum">     355 </span>            :   // We determine the bound by calling BytesUntilTotalBytesLimit() and
<span class="lineNum">     356 </span>            :   // BytesUntilLimit().  These return -1 to mean &quot;no limit set&quot;.
<span class="lineNum">     357 </span>            :   // There are four cases:
<span class="lineNum">     358 </span>            :   // TotalBytesLimit  Limit
<span class="lineNum">     359 </span>            :   // -1               -1     Use slow path.
<span class="lineNum">     360 </span>            :   // -1               &gt;= 0   Use fast path if length &lt;= Limit.
<span class="lineNum">     361 </span>            :   // &gt;= 0             -1     Use slow path.
<span class="lineNum">     362 </span>            :   // &gt;= 0             &gt;= 0   Use fast path if length &lt;= min(both limits).
<span class="lineNum">     363 </span><span class="lineCov">          8 :   int64 bytes_limit = input-&gt;BytesUntilTotalBytesLimit();</span>
<span class="lineNum">     364 </span><span class="lineCov">          8 :   if (bytes_limit == -1) {</span>
<span class="lineNum">     365 </span><span class="lineCov">          8 :     bytes_limit = input-&gt;BytesUntilLimit();</span>
<span class="lineNum">     366 </span>            :   } else {
<span class="lineNum">     367 </span><span class="lineNoCov">          0 :     bytes_limit =</span>
<span class="lineNum">     368 </span><span class="lineNoCov">          0 :         min(bytes_limit, static_cast&lt;int64&gt;(input-&gt;BytesUntilLimit()));</span>
<span class="lineNum">     369 </span>            :   }
<span class="lineNum">     370 </span><span class="lineCov">          8 :   if (bytes_limit &gt;= new_bytes) {</span>
<span class="lineNum">     371 </span>            :     // Fast-path that pre-allocates *values to the final size.
<span class="lineNum">     372 </span>            : #if defined(PROTOBUF_LITTLE_ENDIAN)
<span class="lineNum">     373 </span><span class="lineCov">          8 :     values-&gt;Resize(old_entries + new_entries, 0);</span>
<span class="lineNum">     374 </span>            :     // values-&gt;mutable_data() may change after Resize(), so do this after:
<span class="lineNum">     375 </span><span class="lineCov">          8 :     void* dest = reinterpret_cast&lt;void*&gt;(values-&gt;mutable_data() + old_entries);</span>
<span class="lineNum">     376 </span><span class="lineCov">          8 :     if (!input-&gt;ReadRaw(dest, new_bytes)) {</span>
<span class="lineNum">     377 </span><span class="lineNoCov">          0 :       values-&gt;Truncate(old_entries);</span>
<span class="lineNum">     378 </span>            :       return false;
<span class="lineNum">     379 </span>            :     }
<span class="lineNum">     380 </span>            : #else
<span class="lineNum">     381 </span>            :     values-&gt;Reserve(old_entries + new_entries);
<span class="lineNum">     382 </span>            :     CType value;
<span class="lineNum">     383 </span>            :     for (int i = 0; i &lt; new_entries; ++i) {
<span class="lineNum">     384 </span>            :       if (!ReadPrimitive&lt;CType, DeclaredType&gt;(input, &amp;value)) return false;
<span class="lineNum">     385 </span>            :       values-&gt;AddAlreadyReserved(value);
<span class="lineNum">     386 </span>            :     }
<span class="lineNum">     387 </span>            : #endif
<span class="lineNum">     388 </span>            :   } else {
<span class="lineNum">     389 </span>            :     // This is the slow-path case where &quot;length&quot; may be too large to
<span class="lineNum">     390 </span>            :     // safely allocate.  We read as much as we can into *values
<span class="lineNum">     391 </span>            :     // without pre-allocating &quot;length&quot; bytes.
<span class="lineNum">     392 </span>            :     CType value;
<span class="lineNum">     393 </span><span class="lineNoCov">          0 :     for (uint32 i = 0; i &lt; new_entries; ++i) {</span>
<span class="lineNum">     394 </span><span class="lineNoCov">          0 :       if (!ReadPrimitive&lt;CType, DeclaredType&gt;(input, &amp;value)) return false;</span>
<span class="lineNum">     395 </span><span class="lineNoCov">          0 :       values-&gt;Add(value);</span>
<span class="lineNum">     396 </span>            :     }
<span class="lineNum">     397 </span>            :   }
<span class="lineNum">     398 </span>            :   return true;
<span class="lineNum">     399 </span>            : }
<span class="lineNum">     400 </span>            : 
<span class="lineNum">     401 </span>            : // Specializations of ReadPackedPrimitive for the fixed size types, which use
<span class="lineNum">     402 </span>            : // an optimized code path.
<span class="lineNum">     403 </span>            : #define READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(CPPTYPE, DECLARED_TYPE)      \
<span class="lineNum">     404 </span>            : template &lt;&gt;                                                                    \
<span class="lineNum">     405 </span>            : inline bool WireFormatLite::ReadPackedPrimitive&lt;                               \
<span class="lineNum">     406 </span>            :   CPPTYPE, WireFormatLite::DECLARED_TYPE&gt;(                                     \
<span class="lineNum">     407 </span>            :     io::CodedInputStream* input,                                               \
<span class="lineNum">     408 </span>            :     RepeatedField&lt;CPPTYPE&gt;* values) {                                          \
<span class="lineNum">     409 </span>            :   return ReadPackedFixedSizePrimitive&lt;                                         \
<span class="lineNum">     410 </span>            :       CPPTYPE, WireFormatLite::DECLARED_TYPE&gt;(input, values);                  \
<span class="lineNum">     411 </span>            : }
<span class="lineNum">     412 </span>            : 
<span class="lineNum">     413 </span>            : READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint32, TYPE_FIXED32);
<span class="lineNum">     414 </span>            : READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(uint64, TYPE_FIXED64);
<span class="lineNum">     415 </span>            : READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int32, TYPE_SFIXED32);
<span class="lineNum">     416 </span>            : READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(int64, TYPE_SFIXED64);
<span class="lineNum">     417 </span>            : READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(float, TYPE_FLOAT);
<span class="lineNum">     418 </span>            : READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE(double, TYPE_DOUBLE);
<span class="lineNum">     419 </span>            : 
<span class="lineNum">     420 </span>            : #undef READ_REPEATED_PACKED_FIXED_SIZE_PRIMITIVE
<a name="421"><span class="lineNum">     421 </span>            : </a>
<span class="lineNum">     422 </span>            : template &lt;typename CType, enum WireFormatLite::FieldType DeclaredType&gt;
<span class="lineNum">     423 </span><span class="lineNoCov">          0 : bool WireFormatLite::ReadPackedPrimitiveNoInline(io::CodedInputStream* input,</span>
<span class="lineNum">     424 </span>            :                                                  RepeatedField&lt;CType&gt;* values) {
<span class="lineNum">     425 </span><span class="lineNoCov">          0 :   return ReadPackedPrimitive&lt;CType, DeclaredType&gt;(input, values);</span>
<span class="lineNum">     426 </span>            : }
<span class="lineNum">     427 </span>            : 
<span class="lineNum">     428 </span>            : 
<span class="lineNum">     429 </span>            : inline bool WireFormatLite::ReadGroup(int field_number,
<span class="lineNum">     430 </span>            :                                       io::CodedInputStream* input,
<span class="lineNum">     431 </span>            :                                       MessageLite* value) {
<span class="lineNum">     432 </span>            :   if (!input-&gt;IncrementRecursionDepth()) return false;
<span class="lineNum">     433 </span>            :   if (!value-&gt;MergePartialFromCodedStream(input)) return false;
<span class="lineNum">     434 </span>            :   input-&gt;DecrementRecursionDepth();
<span class="lineNum">     435 </span>            :   // Make sure the last thing read was an end tag for this group.
<span class="lineNum">     436 </span>            :   if (!input-&gt;LastTagWas(MakeTag(field_number, WIRETYPE_END_GROUP))) {
<span class="lineNum">     437 </span>            :     return false;
<span class="lineNum">     438 </span>            :   }
<span class="lineNum">     439 </span>            :   return true;
<span class="lineNum">     440 </span>            : }
<span class="lineNum">     441 </span>            : inline bool WireFormatLite::ReadMessage(io::CodedInputStream* input,
<span class="lineNum">     442 </span>            :                                         MessageLite* value) {
<span class="lineNum">     443 </span>            :   uint32 length;
<span class="lineNum">     444 </span>            :   if (!input-&gt;ReadVarint32(&amp;length)) return false;
<span class="lineNum">     445 </span>            :   if (!input-&gt;IncrementRecursionDepth()) return false;
<span class="lineNum">     446 </span>            :   io::CodedInputStream::Limit limit = input-&gt;PushLimit(length);
<span class="lineNum">     447 </span>            :   if (!value-&gt;MergePartialFromCodedStream(input)) return false;
<span class="lineNum">     448 </span>            :   // Make sure that parsing stopped when the limit was hit, not at an endgroup
<span class="lineNum">     449 </span>            :   // tag.
<span class="lineNum">     450 </span>            :   if (!input-&gt;ConsumedEntireMessage()) return false;
<span class="lineNum">     451 </span>            :   input-&gt;PopLimit(limit);
<span class="lineNum">     452 </span>            :   input-&gt;DecrementRecursionDepth();
<span class="lineNum">     453 </span>            :   return true;
<span class="lineNum">     454 </span>            : }
<span class="lineNum">     455 </span>            : 
<span class="lineNum">     456 </span>            : // We name the template parameter something long and extremely unlikely to occur
<span class="lineNum">     457 </span>            : // elsewhere because a *qualified* member access expression designed to avoid
<span class="lineNum">     458 </span>            : // virtual dispatch, C++03 [basic.lookup.classref] 3.4.5/4 requires that the
<span class="lineNum">     459 </span>            : // name of the qualifying class to be looked up both in the context of the full
<span class="lineNum">     460 </span>            : // expression (finding the template parameter) and in the context of the object
<span class="lineNum">     461 </span>            : // whose member we are accessing. This could potentially find a nested type
<span class="lineNum">     462 </span>            : // within that object. The standard goes on to require these names to refer to
<span class="lineNum">     463 </span>            : // the same entity, which this collision would violate. The lack of a safe way
<span class="lineNum">     464 </span>            : // to avoid this collision appears to be a defect in the standard, but until it
<span class="lineNum">     465 </span>            : // is corrected, we choose the name to avoid accidental collisions.
<span class="lineNum">     466 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     467 </span>            : inline bool WireFormatLite::ReadGroupNoVirtual(
<span class="lineNum">     468 </span>            :     int field_number, io::CodedInputStream* input,
<span class="lineNum">     469 </span>            :     MessageType_WorkAroundCppLookupDefect* value) {
<span class="lineNum">     470 </span>            :   if (!input-&gt;IncrementRecursionDepth()) return false;
<span class="lineNum">     471 </span>            :   if (!value-&gt;
<span class="lineNum">     472 </span>            :       MessageType_WorkAroundCppLookupDefect::MergePartialFromCodedStream(input))
<span class="lineNum">     473 </span>            :     return false;
<span class="lineNum">     474 </span>            :   input-&gt;DecrementRecursionDepth();
<span class="lineNum">     475 </span>            :   // Make sure the last thing read was an end tag for this group.
<span class="lineNum">     476 </span>            :   if (!input-&gt;LastTagWas(MakeTag(field_number, WIRETYPE_END_GROUP))) {
<span class="lineNum">     477 </span>            :     return false;
<span class="lineNum">     478 </span>            :   }
<span class="lineNum">     479 </span>            :   return true;
<a name="480"><span class="lineNum">     480 </span>            : }</a>
<span class="lineNum">     481 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     482 </span><span class="lineCov">         50 : inline bool WireFormatLite::ReadMessageNoVirtual(</span>
<span class="lineNum">     483 </span>            :     io::CodedInputStream* input, MessageType_WorkAroundCppLookupDefect* value) {
<span class="lineNum">     484 </span>            :   uint32 length;
<span class="lineNum">     485 </span><span class="lineCov">         50 :   if (!input-&gt;ReadVarint32(&amp;length)) return false;</span>
<span class="lineNum">     486 </span><span class="lineCov">         50 :   if (!input-&gt;IncrementRecursionDepth()) return false;</span>
<span class="lineNum">     487 </span><span class="lineCov">         50 :   io::CodedInputStream::Limit limit = input-&gt;PushLimit(length);</span>
<span class="lineNum">     488 </span><span class="lineCov">         50 :   if (!value-&gt;</span>
<span class="lineNum">     489 </span>            :       MessageType_WorkAroundCppLookupDefect::MergePartialFromCodedStream(input))
<span class="lineNum">     490 </span>            :     return false;
<span class="lineNum">     491 </span>            :   // Make sure that parsing stopped when the limit was hit, not at an endgroup
<span class="lineNum">     492 </span>            :   // tag.
<span class="lineNum">     493 </span><span class="lineCov">         50 :   if (!input-&gt;ConsumedEntireMessage()) return false;</span>
<span class="lineNum">     494 </span><span class="lineCov">         50 :   input-&gt;PopLimit(limit);</span>
<span class="lineNum">     495 </span>            :   input-&gt;DecrementRecursionDepth();
<span class="lineNum">     496 </span>            :   return true;
<span class="lineNum">     497 </span>            : }
<span class="lineNum">     498 </span>            : 
<span class="lineNum">     499 </span>            : // ===================================================================
<span class="lineNum">     500 </span>            : 
<span class="lineNum">     501 </span>            : inline void WireFormatLite::WriteTag(int field_number, WireType type,
<span class="lineNum">     502 </span>            :                                      io::CodedOutputStream* output) {
<span class="lineNum">     503 </span>            :   output-&gt;WriteTag(MakeTag(field_number, type));
<span class="lineNum">     504 </span>            : }
<span class="lineNum">     505 </span>            : 
<span class="lineNum">     506 </span>            : inline void WireFormatLite::WriteInt32NoTag(int32 value,
<span class="lineNum">     507 </span>            :                                             io::CodedOutputStream* output) {
<span class="lineNum">     508 </span>            :   output-&gt;WriteVarint32SignExtended(value);
<span class="lineNum">     509 </span>            : }
<span class="lineNum">     510 </span>            : inline void WireFormatLite::WriteInt64NoTag(int64 value,
<span class="lineNum">     511 </span>            :                                             io::CodedOutputStream* output) {
<span class="lineNum">     512 </span><span class="lineNoCov">          0 :   output-&gt;WriteVarint64(static_cast&lt;uint64&gt;(value));</span>
<span class="lineNum">     513 </span>            : }
<span class="lineNum">     514 </span>            : inline void WireFormatLite::WriteUInt32NoTag(uint32 value,
<span class="lineNum">     515 </span>            :                                              io::CodedOutputStream* output) {
<span class="lineNum">     516 </span>            :   output-&gt;WriteVarint32(value);
<span class="lineNum">     517 </span>            : }
<span class="lineNum">     518 </span>            : inline void WireFormatLite::WriteUInt64NoTag(uint64 value,
<span class="lineNum">     519 </span>            :                                              io::CodedOutputStream* output) {
<span class="lineNum">     520 </span>            :   output-&gt;WriteVarint64(value);
<span class="lineNum">     521 </span>            : }
<span class="lineNum">     522 </span>            : inline void WireFormatLite::WriteSInt32NoTag(int32 value,
<span class="lineNum">     523 </span>            :                                              io::CodedOutputStream* output) {
<span class="lineNum">     524 </span>            :   output-&gt;WriteVarint32(ZigZagEncode32(value));
<span class="lineNum">     525 </span>            : }
<span class="lineNum">     526 </span>            : inline void WireFormatLite::WriteSInt64NoTag(int64 value,
<span class="lineNum">     527 </span>            :                                              io::CodedOutputStream* output) {
<span class="lineNum">     528 </span>            :   output-&gt;WriteVarint64(ZigZagEncode64(value));
<span class="lineNum">     529 </span>            : }
<span class="lineNum">     530 </span>            : inline void WireFormatLite::WriteFixed32NoTag(uint32 value,
<span class="lineNum">     531 </span>            :                                               io::CodedOutputStream* output) {
<span class="lineNum">     532 </span>            :   output-&gt;WriteLittleEndian32(value);
<span class="lineNum">     533 </span>            : }
<span class="lineNum">     534 </span>            : inline void WireFormatLite::WriteFixed64NoTag(uint64 value,
<span class="lineNum">     535 </span>            :                                               io::CodedOutputStream* output) {
<span class="lineNum">     536 </span>            :   output-&gt;WriteLittleEndian64(value);
<span class="lineNum">     537 </span>            : }
<span class="lineNum">     538 </span>            : inline void WireFormatLite::WriteSFixed32NoTag(int32 value,
<span class="lineNum">     539 </span>            :                                                io::CodedOutputStream* output) {
<span class="lineNum">     540 </span>            :   output-&gt;WriteLittleEndian32(static_cast&lt;uint32&gt;(value));
<span class="lineNum">     541 </span>            : }
<span class="lineNum">     542 </span>            : inline void WireFormatLite::WriteSFixed64NoTag(int64 value,
<span class="lineNum">     543 </span>            :                                                io::CodedOutputStream* output) {
<span class="lineNum">     544 </span>            :   output-&gt;WriteLittleEndian64(static_cast&lt;uint64&gt;(value));
<span class="lineNum">     545 </span>            : }
<span class="lineNum">     546 </span>            : inline void WireFormatLite::WriteFloatNoTag(float value,
<span class="lineNum">     547 </span>            :                                             io::CodedOutputStream* output) {
<span class="lineNum">     548 </span><span class="lineNoCov">          0 :   output-&gt;WriteLittleEndian32(EncodeFloat(value));</span>
<span class="lineNum">     549 </span>            : }
<span class="lineNum">     550 </span>            : inline void WireFormatLite::WriteDoubleNoTag(double value,
<span class="lineNum">     551 </span>            :                                              io::CodedOutputStream* output) {
<span class="lineNum">     552 </span><span class="lineNoCov">          0 :   output-&gt;WriteLittleEndian64(EncodeDouble(value));</span>
<span class="lineNum">     553 </span>            : }
<span class="lineNum">     554 </span>            : inline void WireFormatLite::WriteBoolNoTag(bool value,
<span class="lineNum">     555 </span>            :                                            io::CodedOutputStream* output) {
<span class="lineNum">     556 </span>            :   output-&gt;WriteVarint32(value ? 1 : 0);
<span class="lineNum">     557 </span>            : }
<span class="lineNum">     558 </span>            : inline void WireFormatLite::WriteEnumNoTag(int value,
<span class="lineNum">     559 </span>            :                                            io::CodedOutputStream* output) {
<span class="lineNum">     560 </span>            :   output-&gt;WriteVarint32SignExtended(value);
<span class="lineNum">     561 </span>            : }
<span class="lineNum">     562 </span>            : 
<span class="lineNum">     563 </span>            : // See comment on ReadGroupNoVirtual to understand the need for this template
<span class="lineNum">     564 </span>            : // parameter name.
<span class="lineNum">     565 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     566 </span>            : inline void WireFormatLite::WriteGroupNoVirtual(
<span class="lineNum">     567 </span>            :     int field_number, const MessageType_WorkAroundCppLookupDefect&amp; value,
<span class="lineNum">     568 </span>            :     io::CodedOutputStream* output) {
<span class="lineNum">     569 </span>            :   WriteTag(field_number, WIRETYPE_START_GROUP, output);
<span class="lineNum">     570 </span>            :   value.MessageType_WorkAroundCppLookupDefect::SerializeWithCachedSizes(output);
<span class="lineNum">     571 </span>            :   WriteTag(field_number, WIRETYPE_END_GROUP, output);
<span class="lineNum">     572 </span>            : }
<span class="lineNum">     573 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     574 </span>            : inline void WireFormatLite::WriteMessageNoVirtual(
<span class="lineNum">     575 </span>            :     int field_number, const MessageType_WorkAroundCppLookupDefect&amp; value,
<span class="lineNum">     576 </span>            :     io::CodedOutputStream* output) {
<span class="lineNum">     577 </span>            :   WriteTag(field_number, WIRETYPE_LENGTH_DELIMITED, output);
<span class="lineNum">     578 </span>            :   output-&gt;WriteVarint32(
<span class="lineNum">     579 </span>            :       value.MessageType_WorkAroundCppLookupDefect::GetCachedSize());
<span class="lineNum">     580 </span>            :   value.MessageType_WorkAroundCppLookupDefect::SerializeWithCachedSizes(output);
<span class="lineNum">     581 </span>            : }
<span class="lineNum">     582 </span>            : 
<span class="lineNum">     583 </span>            : // ===================================================================
<span class="lineNum">     584 </span>            : 
<span class="lineNum">     585 </span>            : inline uint8* WireFormatLite::WriteTagToArray(int field_number,
<span class="lineNum">     586 </span>            :                                               WireType type,
<span class="lineNum">     587 </span>            :                                               uint8* target) {
<span class="lineNum">     588 </span>            :   return io::CodedOutputStream::WriteTagToArray(MakeTag(field_number, type),
<span class="lineNum">     589 </span>            :                                                 target);
<span class="lineNum">     590 </span>            : }
<span class="lineNum">     591 </span>            : 
<span class="lineNum">     592 </span>            : inline uint8* WireFormatLite::WriteInt32NoTagToArray(int32 value,
<span class="lineNum">     593 </span>            :                                                      uint8* target) {
<span class="lineNum">     594 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::WriteVarint32SignExtendedToArray(value, target);</span>
<span class="lineNum">     595 </span>            : }
<span class="lineNum">     596 </span>            : inline uint8* WireFormatLite::WriteInt64NoTagToArray(int64 value,
<span class="lineNum">     597 </span>            :                                                      uint8* target) {
<span class="lineNum">     598 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::WriteVarint64ToArray(</span>
<span class="lineNum">     599 </span><span class="lineNoCov">          0 :       static_cast&lt;uint64&gt;(value), target);</span>
<span class="lineNum">     600 </span>            : }
<span class="lineNum">     601 </span>            : inline uint8* WireFormatLite::WriteUInt32NoTagToArray(uint32 value,
<span class="lineNum">     602 </span>            :                                                       uint8* target) {
<span class="lineNum">     603 </span>            :   return io::CodedOutputStream::WriteVarint32ToArray(value, target);
<span class="lineNum">     604 </span>            : }
<span class="lineNum">     605 </span>            : inline uint8* WireFormatLite::WriteUInt64NoTagToArray(uint64 value,
<span class="lineNum">     606 </span>            :                                                       uint8* target) {
<span class="lineNum">     607 </span>            :   return io::CodedOutputStream::WriteVarint64ToArray(value, target);
<span class="lineNum">     608 </span>            : }
<span class="lineNum">     609 </span>            : inline uint8* WireFormatLite::WriteSInt32NoTagToArray(int32 value,
<span class="lineNum">     610 </span>            :                                                       uint8* target) {
<span class="lineNum">     611 </span>            :   return io::CodedOutputStream::WriteVarint32ToArray(ZigZagEncode32(value),
<span class="lineNum">     612 </span>            :                                                      target);
<span class="lineNum">     613 </span>            : }
<span class="lineNum">     614 </span>            : inline uint8* WireFormatLite::WriteSInt64NoTagToArray(int64 value,
<span class="lineNum">     615 </span>            :                                                       uint8* target) {
<span class="lineNum">     616 </span>            :   return io::CodedOutputStream::WriteVarint64ToArray(ZigZagEncode64(value),
<span class="lineNum">     617 </span>            :                                                      target);
<span class="lineNum">     618 </span>            : }
<span class="lineNum">     619 </span>            : inline uint8* WireFormatLite::WriteFixed32NoTagToArray(uint32 value,
<span class="lineNum">     620 </span>            :                                                        uint8* target) {
<span class="lineNum">     621 </span>            :   return io::CodedOutputStream::WriteLittleEndian32ToArray(value, target);
<span class="lineNum">     622 </span>            : }
<span class="lineNum">     623 </span>            : inline uint8* WireFormatLite::WriteFixed64NoTagToArray(uint64 value,
<span class="lineNum">     624 </span>            :                                                        uint8* target) {
<span class="lineNum">     625 </span>            :   return io::CodedOutputStream::WriteLittleEndian64ToArray(value, target);
<span class="lineNum">     626 </span>            : }
<span class="lineNum">     627 </span>            : inline uint8* WireFormatLite::WriteSFixed32NoTagToArray(int32 value,
<span class="lineNum">     628 </span>            :                                                         uint8* target) {
<span class="lineNum">     629 </span>            :   return io::CodedOutputStream::WriteLittleEndian32ToArray(
<span class="lineNum">     630 </span>            :       static_cast&lt;uint32&gt;(value), target);
<span class="lineNum">     631 </span>            : }
<span class="lineNum">     632 </span>            : inline uint8* WireFormatLite::WriteSFixed64NoTagToArray(int64 value,
<span class="lineNum">     633 </span>            :                                                         uint8* target) {
<span class="lineNum">     634 </span>            :   return io::CodedOutputStream::WriteLittleEndian64ToArray(
<span class="lineNum">     635 </span>            :       static_cast&lt;uint64&gt;(value), target);
<span class="lineNum">     636 </span>            : }
<span class="lineNum">     637 </span>            : inline uint8* WireFormatLite::WriteFloatNoTagToArray(float value,
<span class="lineNum">     638 </span>            :                                                      uint8* target) {
<span class="lineNum">     639 </span>            :   return io::CodedOutputStream::WriteLittleEndian32ToArray(EncodeFloat(value),
<span class="lineNum">     640 </span>            :                                                            target);
<span class="lineNum">     641 </span>            : }
<span class="lineNum">     642 </span>            : inline uint8* WireFormatLite::WriteDoubleNoTagToArray(double value,
<span class="lineNum">     643 </span>            :                                                       uint8* target) {
<span class="lineNum">     644 </span>            :   return io::CodedOutputStream::WriteLittleEndian64ToArray(EncodeDouble(value),
<span class="lineNum">     645 </span>            :                                                            target);
<span class="lineNum">     646 </span>            : }
<span class="lineNum">     647 </span>            : inline uint8* WireFormatLite::WriteBoolNoTagToArray(bool value,
<span class="lineNum">     648 </span>            :                                                     uint8* target) {
<span class="lineNum">     649 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::WriteVarint32ToArray(value ? 1 : 0, target);</span>
<span class="lineNum">     650 </span>            : }
<span class="lineNum">     651 </span>            : inline uint8* WireFormatLite::WriteEnumNoTagToArray(int value,
<span class="lineNum">     652 </span>            :                                                     uint8* target) {
<span class="lineNum">     653 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::WriteVarint32SignExtendedToArray(value, target);</span>
<span class="lineNum">     654 </span>            : }
<span class="lineNum">     655 </span>            : 
<span class="lineNum">     656 </span>            : inline uint8* WireFormatLite::WriteInt32ToArray(int field_number,
<span class="lineNum">     657 </span>            :                                                 int32 value,
<span class="lineNum">     658 </span>            :                                                 uint8* target) {
<span class="lineNum">     659 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     660 </span>            :   return WriteInt32NoTagToArray(value, target);
<span class="lineNum">     661 </span>            : }
<span class="lineNum">     662 </span>            : inline uint8* WireFormatLite::WriteInt64ToArray(int field_number,
<span class="lineNum">     663 </span>            :                                                 int64 value,
<span class="lineNum">     664 </span>            :                                                 uint8* target) {
<span class="lineNum">     665 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     666 </span>            :   return WriteInt64NoTagToArray(value, target);
<span class="lineNum">     667 </span>            : }
<span class="lineNum">     668 </span>            : inline uint8* WireFormatLite::WriteUInt32ToArray(int field_number,
<span class="lineNum">     669 </span>            :                                                  uint32 value,
<span class="lineNum">     670 </span>            :                                                  uint8* target) {
<span class="lineNum">     671 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     672 </span>            :   return WriteUInt32NoTagToArray(value, target);
<span class="lineNum">     673 </span>            : }
<span class="lineNum">     674 </span>            : inline uint8* WireFormatLite::WriteUInt64ToArray(int field_number,
<span class="lineNum">     675 </span>            :                                                  uint64 value,
<span class="lineNum">     676 </span>            :                                                  uint8* target) {
<span class="lineNum">     677 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     678 </span>            :   return WriteUInt64NoTagToArray(value, target);
<span class="lineNum">     679 </span>            : }
<span class="lineNum">     680 </span>            : inline uint8* WireFormatLite::WriteSInt32ToArray(int field_number,
<span class="lineNum">     681 </span>            :                                                  int32 value,
<span class="lineNum">     682 </span>            :                                                  uint8* target) {
<span class="lineNum">     683 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     684 </span>            :   return WriteSInt32NoTagToArray(value, target);
<span class="lineNum">     685 </span>            : }
<span class="lineNum">     686 </span>            : inline uint8* WireFormatLite::WriteSInt64ToArray(int field_number,
<span class="lineNum">     687 </span>            :                                                  int64 value,
<span class="lineNum">     688 </span>            :                                                  uint8* target) {
<span class="lineNum">     689 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     690 </span>            :   return WriteSInt64NoTagToArray(value, target);
<span class="lineNum">     691 </span>            : }
<span class="lineNum">     692 </span>            : inline uint8* WireFormatLite::WriteFixed32ToArray(int field_number,
<span class="lineNum">     693 </span>            :                                                   uint32 value,
<span class="lineNum">     694 </span>            :                                                   uint8* target) {
<span class="lineNum">     695 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_FIXED32, target);
<span class="lineNum">     696 </span>            :   return WriteFixed32NoTagToArray(value, target);
<span class="lineNum">     697 </span>            : }
<span class="lineNum">     698 </span>            : inline uint8* WireFormatLite::WriteFixed64ToArray(int field_number,
<span class="lineNum">     699 </span>            :                                                   uint64 value,
<span class="lineNum">     700 </span>            :                                                   uint8* target) {
<span class="lineNum">     701 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_FIXED64, target);
<span class="lineNum">     702 </span>            :   return WriteFixed64NoTagToArray(value, target);
<span class="lineNum">     703 </span>            : }
<span class="lineNum">     704 </span>            : inline uint8* WireFormatLite::WriteSFixed32ToArray(int field_number,
<span class="lineNum">     705 </span>            :                                                    int32 value,
<span class="lineNum">     706 </span>            :                                                    uint8* target) {
<span class="lineNum">     707 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_FIXED32, target);
<span class="lineNum">     708 </span>            :   return WriteSFixed32NoTagToArray(value, target);
<span class="lineNum">     709 </span>            : }
<span class="lineNum">     710 </span>            : inline uint8* WireFormatLite::WriteSFixed64ToArray(int field_number,
<span class="lineNum">     711 </span>            :                                                    int64 value,
<span class="lineNum">     712 </span>            :                                                    uint8* target) {
<span class="lineNum">     713 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_FIXED64, target);
<span class="lineNum">     714 </span>            :   return WriteSFixed64NoTagToArray(value, target);
<span class="lineNum">     715 </span>            : }
<span class="lineNum">     716 </span>            : inline uint8* WireFormatLite::WriteFloatToArray(int field_number,
<span class="lineNum">     717 </span>            :                                                 float value,
<span class="lineNum">     718 </span>            :                                                 uint8* target) {
<span class="lineNum">     719 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_FIXED32, target);
<span class="lineNum">     720 </span>            :   return WriteFloatNoTagToArray(value, target);
<span class="lineNum">     721 </span>            : }
<span class="lineNum">     722 </span>            : inline uint8* WireFormatLite::WriteDoubleToArray(int field_number,
<span class="lineNum">     723 </span>            :                                                  double value,
<span class="lineNum">     724 </span>            :                                                  uint8* target) {
<span class="lineNum">     725 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_FIXED64, target);
<span class="lineNum">     726 </span>            :   return WriteDoubleNoTagToArray(value, target);
<span class="lineNum">     727 </span>            : }
<span class="lineNum">     728 </span>            : inline uint8* WireFormatLite::WriteBoolToArray(int field_number,
<span class="lineNum">     729 </span>            :                                                bool value,
<span class="lineNum">     730 </span>            :                                                uint8* target) {
<span class="lineNum">     731 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     732 </span>            :   return WriteBoolNoTagToArray(value, target);
<span class="lineNum">     733 </span>            : }
<span class="lineNum">     734 </span>            : inline uint8* WireFormatLite::WriteEnumToArray(int field_number,
<span class="lineNum">     735 </span>            :                                                int value,
<span class="lineNum">     736 </span>            :                                                uint8* target) {
<span class="lineNum">     737 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
<span class="lineNum">     738 </span>            :   return WriteEnumNoTagToArray(value, target);
<span class="lineNum">     739 </span>            : }
<span class="lineNum">     740 </span>            : 
<span class="lineNum">     741 </span>            : inline uint8* WireFormatLite::WriteStringToArray(int field_number,
<span class="lineNum">     742 </span>            :                                                  const string&amp; value,
<span class="lineNum">     743 </span>            :                                                  uint8* target) {
<span class="lineNum">     744 </span>            :   // String is for UTF-8 text only
<span class="lineNum">     745 </span>            :   // WARNING:  In wire_format.cc, both strings and bytes are handled by
<span class="lineNum">     746 </span>            :   //   WriteString() to avoid code duplication.  If the implementations become
<span class="lineNum">     747 </span>            :   //   different, you will need to update that usage.
<span class="lineNum">     748 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
<span class="lineNum">     749 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::WriteStringWithSizeToArray(value, target);</span>
<span class="lineNum">     750 </span>            : }
<span class="lineNum">     751 </span>            : inline uint8* WireFormatLite::WriteBytesToArray(int field_number,
<span class="lineNum">     752 </span>            :                                                 const string&amp; value,
<span class="lineNum">     753 </span>            :                                                 uint8* target) {
<span class="lineNum">     754 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
<span class="lineNum">     755 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::WriteStringWithSizeToArray(value, target);</span>
<span class="lineNum">     756 </span>            : }
<span class="lineNum">     757 </span>            : 
<span class="lineNum">     758 </span>            : 
<span class="lineNum">     759 </span>            : inline uint8* WireFormatLite::WriteGroupToArray(int field_number,
<span class="lineNum">     760 </span>            :                                                 const MessageLite&amp; value,
<span class="lineNum">     761 </span>            :                                                 uint8* target) {
<span class="lineNum">     762 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_START_GROUP, target);
<span class="lineNum">     763 </span>            :   target = value.SerializeWithCachedSizesToArray(target);
<span class="lineNum">     764 </span>            :   return WriteTagToArray(field_number, WIRETYPE_END_GROUP, target);
<span class="lineNum">     765 </span>            : }
<span class="lineNum">     766 </span>            : inline uint8* WireFormatLite::WriteMessageToArray(int field_number,
<span class="lineNum">     767 </span>            :                                                   const MessageLite&amp; value,
<span class="lineNum">     768 </span>            :                                                   uint8* target) {
<span class="lineNum">     769 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
<span class="lineNum">     770 </span>            :   target = io::CodedOutputStream::WriteVarint32ToArray(
<span class="lineNum">     771 </span>            :     value.GetCachedSize(), target);
<span class="lineNum">     772 </span>            :   return value.SerializeWithCachedSizesToArray(target);
<span class="lineNum">     773 </span>            : }
<span class="lineNum">     774 </span>            : 
<span class="lineNum">     775 </span>            : // See comment on ReadGroupNoVirtual to understand the need for this template
<span class="lineNum">     776 </span>            : // parameter name.
<span class="lineNum">     777 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     778 </span>            : inline uint8* WireFormatLite::WriteGroupNoVirtualToArray(
<span class="lineNum">     779 </span>            :     int field_number, const MessageType_WorkAroundCppLookupDefect&amp; value,
<span class="lineNum">     780 </span>            :     uint8* target) {
<span class="lineNum">     781 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_START_GROUP, target);
<span class="lineNum">     782 </span>            :   target = value.MessageType_WorkAroundCppLookupDefect
<span class="lineNum">     783 </span>            :       ::SerializeWithCachedSizesToArray(target);
<span class="lineNum">     784 </span>            :   return WriteTagToArray(field_number, WIRETYPE_END_GROUP, target);
<span class="lineNum">     785 </span>            : }
<span class="lineNum">     786 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     787 </span>            : inline uint8* WireFormatLite::WriteMessageNoVirtualToArray(
<span class="lineNum">     788 </span>            :     int field_number, const MessageType_WorkAroundCppLookupDefect&amp; value,
<span class="lineNum">     789 </span>            :     uint8* target) {
<span class="lineNum">     790 </span>            :   target = WriteTagToArray(field_number, WIRETYPE_LENGTH_DELIMITED, target);
<span class="lineNum">     791 </span><span class="lineNoCov">          0 :   target = io::CodedOutputStream::WriteVarint32ToArray(</span>
<span class="lineNum">     792 </span>            :     value.MessageType_WorkAroundCppLookupDefect::GetCachedSize(), target);
<span class="lineNum">     793 </span>            :   return value.MessageType_WorkAroundCppLookupDefect
<span class="lineNum">     794 </span><span class="lineNoCov">          0 :       ::SerializeWithCachedSizesToArray(target);</span>
<span class="lineNum">     795 </span>            : }
<span class="lineNum">     796 </span>            : 
<span class="lineNum">     797 </span>            : // ===================================================================
<span class="lineNum">     798 </span>            : 
<span class="lineNum">     799 </span>            : inline int WireFormatLite::Int32Size(int32 value) {
<span class="lineNum">     800 </span>            :   return io::CodedOutputStream::VarintSize32SignExtended(value);
<span class="lineNum">     801 </span>            : }
<span class="lineNum">     802 </span>            : inline int WireFormatLite::Int64Size(int64 value) {
<span class="lineNum">     803 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::VarintSize64(static_cast&lt;uint64&gt;(value));</span>
<span class="lineNum">     804 </span>            : }
<span class="lineNum">     805 </span>            : inline int WireFormatLite::UInt32Size(uint32 value) {
<span class="lineNum">     806 </span>            :   return io::CodedOutputStream::VarintSize32(value);
<span class="lineNum">     807 </span>            : }
<span class="lineNum">     808 </span>            : inline int WireFormatLite::UInt64Size(uint64 value) {
<span class="lineNum">     809 </span>            :   return io::CodedOutputStream::VarintSize64(value);
<span class="lineNum">     810 </span>            : }
<span class="lineNum">     811 </span>            : inline int WireFormatLite::SInt32Size(int32 value) {
<span class="lineNum">     812 </span>            :   return io::CodedOutputStream::VarintSize32(ZigZagEncode32(value));
<span class="lineNum">     813 </span>            : }
<span class="lineNum">     814 </span>            : inline int WireFormatLite::SInt64Size(int64 value) {
<span class="lineNum">     815 </span>            :   return io::CodedOutputStream::VarintSize64(ZigZagEncode64(value));
<span class="lineNum">     816 </span>            : }
<span class="lineNum">     817 </span>            : inline int WireFormatLite::EnumSize(int value) {
<span class="lineNum">     818 </span>            :   return io::CodedOutputStream::VarintSize32SignExtended(value);
<span class="lineNum">     819 </span>            : }
<span class="lineNum">     820 </span>            : 
<span class="lineNum">     821 </span>            : inline int WireFormatLite::StringSize(const string&amp; value) {
<span class="lineNum">     822 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::VarintSize32(value.size()) +</span>
<span class="lineNum">     823 </span><span class="lineNoCov">          0 :          value.size();</span>
<span class="lineNum">     824 </span>            : }
<span class="lineNum">     825 </span>            : inline int WireFormatLite::BytesSize(const string&amp; value) {
<span class="lineNum">     826 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::VarintSize32(value.size()) +</span>
<span class="lineNum">     827 </span><span class="lineNoCov">          0 :          value.size();</span>
<span class="lineNum">     828 </span>            : }
<span class="lineNum">     829 </span>            : 
<span class="lineNum">     830 </span>            : 
<span class="lineNum">     831 </span>            : inline int WireFormatLite::GroupSize(const MessageLite&amp; value) {
<span class="lineNum">     832 </span>            :   return value.ByteSize();
<span class="lineNum">     833 </span>            : }
<span class="lineNum">     834 </span>            : inline int WireFormatLite::MessageSize(const MessageLite&amp; value) {
<span class="lineNum">     835 </span>            :   return LengthDelimitedSize(value.ByteSize());
<span class="lineNum">     836 </span>            : }
<span class="lineNum">     837 </span>            : 
<span class="lineNum">     838 </span>            : // See comment on ReadGroupNoVirtual to understand the need for this template
<span class="lineNum">     839 </span>            : // parameter name.
<span class="lineNum">     840 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     841 </span>            : inline int WireFormatLite::GroupSizeNoVirtual(
<span class="lineNum">     842 </span>            :     const MessageType_WorkAroundCppLookupDefect&amp; value) {
<span class="lineNum">     843 </span>            :   return value.MessageType_WorkAroundCppLookupDefect::ByteSize();
<a name="844"><span class="lineNum">     844 </span>            : }</a>
<span class="lineNum">     845 </span>            : template&lt;typename MessageType_WorkAroundCppLookupDefect&gt;
<span class="lineNum">     846 </span><span class="lineNoCov">          0 : inline int WireFormatLite::MessageSizeNoVirtual(</span>
<span class="lineNum">     847 </span>            :     const MessageType_WorkAroundCppLookupDefect&amp; value) {
<span class="lineNum">     848 </span><span class="lineNoCov">          0 :   return LengthDelimitedSize(</span>
<span class="lineNum">     849 </span><span class="lineNoCov">          0 :       value.MessageType_WorkAroundCppLookupDefect::ByteSize());</span>
<span class="lineNum">     850 </span>            : }
<span class="lineNum">     851 </span>            : 
<span class="lineNum">     852 </span>            : inline int WireFormatLite::LengthDelimitedSize(int length) {
<span class="lineNum">     853 </span><span class="lineNoCov">          0 :   return io::CodedOutputStream::VarintSize32(length) + length;</span>
<span class="lineNum">     854 </span>            : }
<span class="lineNum">     855 </span>            : 
<span class="lineNum">     856 </span>            : }  // namespace internal
<span class="lineNum">     857 </span>            : }  // namespace protobuf
<span class="lineNum">     858 </span>            : 
<span class="lineNum">     859 </span>            : }  // namespace google
<span class="lineNum">     860 </span>            : #endif  // GOOGLE_PROTOBUF_WIRE_FORMAT_LITE_INL_H__
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
